﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RouteShift.aspx.cs" Inherits="System_RouteShift" MasterPageFile="~/MasterPage.master"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>线路转移</title>
    <link href="../resources/styles/style.css" type="text/css" rel="stylesheet" />

    <script src="../JavaScript/common.js" type="text/javascript"></script>

    <script type="text/javascript">
            function setRadio(nowRadio)
            {
                var myForm,objRadio;
                myForm=document.forms[0];
                //alert(myForm);
                for(var i=0;i<myForm.length;i++)
                {
                    if(myForm.elements[i].type=="radio")
                    {
                        objRadio=myForm.elements[i];
                        ///alert(objRadio.name);
                        if(objRadio!=nowRadio && objRadio.name.indexOf("gvOldMobileUser")>-1 && objRadio.name.indexOf("rdoOld")>-1)
                        {
                        //alert(objRadio.name);
                            if(objRadio.checked)
                            {
                                objRadio.checked=false;
                            }
                        }
                    }
                }
            }
            
            function setObjectiveRadio(nowRadio)
            {
                var myForm,objRadio;
                myForm=document.forms[0];
                //alert(myForm);
                for(var i=0;i<myForm.length;i++)
                {
                    if(myForm.elements[i].type=="radio")
                    {
                        objRadio=myForm.elements[i];
                        ///alert(objRadio.name);
                        if(objRadio!=nowRadio && objRadio.name.indexOf("gvNewMobileUser")>-1 && objRadio.name.indexOf("rdoObjective")>-1)
                        {
                        //alert(objRadio.name);
                            if(objRadio.checked)
                            {
                                objRadio.checked=false;
                            }
                        }
                    }
                }
            }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table id="wsd_inputtable">
        <tr>
            <td class="tabletitle" colspan="6">
                查询条件
            </td>
        </tr>
        <tr>
            <td class="tablefield">
                部门:
            </td>
            <td nowrap="nowrap">
                <asp:TextBox ID="txtOrg" runat="server" onkeydown="alert('请选择部门');return false;"
                    OnTextChanged="txtOrg_TextChanged"></asp:TextBox>
                <img src="../Resources/Images/search.png" alt="查找" style="cursor: pointer;" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&SelectType=multi','','300','500');" />
                <input id="txtHidOrg" type="hidden" runat="server" />
            </td>
            <td class="tablefield">
                原业代姓名:
            </td>
            <td nowrap="nowrap">
                <asp:DropDownList ID="ddlOldUser" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOldUser_SelectedIndexChanged">
                    <asp:ListItem Text="--所有--" Value=""></asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="tablefield">
                目标业代姓名:
            </td>
            <td nowrap="nowrap">
                <asp:DropDownList ID="ddlObjectiveUser" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlObjectiveUser_SelectedIndexChanged">
                    <asp:ListItem Text="--所有--" Value=""></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="tablefield">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td class="tablefield">
                &nbsp;
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请选择部门!"
                    ControlToValidate="txtOrg"></asp:RequiredFieldValidator>
            </td>
            <td class="buttonarea" colspan="2">
                <asp:Button ID="btnQuery" runat="server" Text="查  询" CssClass="wsd_button2" OnClick="btnQuery_Click" />&nbsp;
            </td>
        </tr>
    </table>
    <br />
    <table id="wsd_listtable">
        <tr>
            <td style="vertical-align: top">
                <asp:GridView Width="100%" ID="gvOldMobileUser" runat="server" AutoGenerateColumns="False"
                    EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                    AllowPaging="True" PageSize="20" DataKeyNames="USER_ID" OnRowDataBound="gvOldMobileUser_RowDataBound"
                    OnPageIndexChanging="gvOldMobileUser_PageIndexChanging">
                    <HeaderStyle CssClass="titlist" />
                    <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                    <Columns>
                        <asp:BoundField HeaderText="原业代" DataField="NAME" />
                        <asp:BoundField HeaderText="帐号" DataField="CODE" />
                        <asp:BoundField HeaderText="电话" DataField="TELEPHONE" />
                        <asp:BoundField HeaderText="职位" DataField="POSITION" />
                        <asp:TemplateField HeaderText="选择">
                            <ItemTemplate>
                                <asp:RadioButton ID="rdoOld" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerSettings Mode="NumericFirstLast" PageButtonCount="20" />
                    <RowStyle CssClass="evenline" />
                    <AlternatingRowStyle CssClass="oddline" />
                </asp:GridView>
            </td>
            <td style="vertical-align: top">
                <asp:GridView Width="100%" ID="gvNewMobileUser" runat="server" AutoGenerateColumns="False"
                    EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                    AllowPaging="True" PageSize="20" DataKeyNames="USER_ID" OnRowDataBound="gvNewMobileUser_RowDataBound"
                    OnPageIndexChanging="gvNewMobileUser_PageIndexChanging">
                    <HeaderStyle CssClass="titlist" />
                    <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                    <Columns>
                        <asp:BoundField HeaderText="目标业代" DataField="NAME" />
                        <asp:BoundField HeaderText="帐号" DataField="CODE" />
                        <asp:BoundField HeaderText="电话" DataField="TELEPHONE" />
                        <asp:BoundField HeaderText="职位" DataField="POSITION" />
                        <asp:TemplateField HeaderText="选择">
                            <ItemTemplate>
                                <asp:RadioButton ID="rdoObjective" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerSettings Mode="NumericFirstLast" PageButtonCount="20" />
                    <RowStyle CssClass="evenline" />
                    <AlternatingRowStyle CssClass="oddline" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    <br />
    <table id="wsd_inputtable">
        <tr>
            <td width="100%" class="tabletitle">
                操作选项
            </td>
        </tr>
        <tr>
            <td class="buttonarea">
                <asp:Button ID="btnShift" CssClass="wsd_button2" runat="server" Text="交  换" OnClick="btnShift_Click" />
                <input id="btnBack" class="wsd_button2" type="button" value="返  回" onclick="location.href='Mobile_User_List.aspx'" />
            </td>
        </tr>
    </table>
</asp:Content>
